// const path = require('path');
// const nodeExternals = require('webpack-node-externals');
//
// module.exports = {
//     target: 'node',
//     mode: 'development',
//     entry: './src/server/server.js',
//     output: {
//         filename: "bundle.js",
//         path: path.resolve(__dirname, 'build')
//     },
//     externals: [nodeExternals()],
//     module: {
//         rules: [{
//             test: /\.js?$/,
//             loader: 'babel-loader',
//             exclude: /node_modules/,
//             options: {
//                 presets:['react', 'stage-0',['env',{
//                     targets: {
//                         browsers: ['last 2 versions']
//                     }
//                 }
//                 ]]
//             }
//         }]
//     }
// };
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const merge = require('webpack-merge');
const config = require('./webpack.base');
const serverConfig = {
    target: 'node',
    mode: 'development',
    entry: './src/server/server.js',
    output: {
        filename: "bundle.js",
        path: path.resolve(__dirname, '../build')
    },
    externals: [nodeExternals()]
};

module.exports = merge(config, serverConfig);
